<script setup>
defineProps({
  prize: Object
})
</script>

<template>
  <div class="challenge-prize">
    <van-image :height="50" fit="cover" :src="prize.image" />
    <div class="challenge-name">
      <div class="prize-name">{{ prize.name }}</div>
      <div>ID: {{ prize.id }} {{ prize.cat_id_name }} ￥{{ prize.price }}</div>
    </div>
  </div>
</template>

<style scoped lang="less">
.challenge-prize {
  width: 100%;
  display: flex;
  font-size: 11px;

  .challenge-name {
    margin-left: 10px;

    .prize-name {
      text-overflow: ellipsis;
      overflow: hidden;
      white-space: nowrap;
      max-width: 100px;
    }
  }
}
</style>